#ifndef EXPR_OP_HPP
#define EXPR_OP_HPP
//*expr_op.hpp
#include "expr_template.hpp"
#include "expr_scalar.hpp"
#include "expr_array.hpp"

//* addition of two Arrays
template <typename T, typename R1, typename R2>
Array<T,A_Add<T,R1,R2> >
	operator+ (Array<T,R1> const& a, Array<T,R2> const& b) {
		return Array<T,A_Add<T,R1,R2> >
			(A_Add<T,R1,R2>(a.rep(),b.rep() ));
}

//* multiplication of two Arrays
template <typename T, typename R1, typename R2>
Array<T,A_Mult<T,R1,R2> >
	operator* (Array<T,R1> const& a, Array<T,R2> const& b) {
		return Array<T,A_Mult<T,R1,R2> >
			(A_Mult<T,R1,R2>(a.rep(),b.rep() ));
}

//*multiplication of scalar and Array
template <typename T, typename R2>
Array<T, A_Mult<T,A_Scalar<T>,R2 > >
	operator* (T const& s, Array<T,R2> const& b) {
		return Array<T,A_Mult<T,A_Scalar<T>,R2> >
			(A_Mult<T,A_Scalar<T>,R2>(A_Scalar<T>(s),b.rep()) );
}

#endif